package com.minhua.jijiehao2.utils

import android.app.Activity
import com.minhua.jijiehao2.view.LoadingDialog

/**
 * @author moo
 * @date 2017/11/18.
 * @describe
 */
object LoadingDialogUtil {
    private var dialog: LoadingDialog? = null

    fun showDialog(activity: Activity, mOnCancel: LoadingDialog.OnCancel? = null) {
        dialog = LoadingDialog(activity)
        dialog?.setOnCancel { mOnCancel }
        dialog?.show()
    }


    fun dismissDialog() {
        dialog?.dismiss()
    }
}